package com.demo.prototype.deepClone;

public class Client {
    public static void main(String[] args) throws Exception {

        DeepProtoType deepProtoType = new DeepProtoType();
        deepProtoType.setClassName("DeepProtoType");

        DeepCloneableTarget deepCloneableTarget = new DeepCloneableTarget("cloneName", "cloneClass");
        deepProtoType.setDeepCloneableTarget(deepCloneableTarget);
        System.out.println(deepProtoType);
        System.out.println("方式一");
        Object clone = deepProtoType.clone();
        System.out.println(clone);

        System.out.println("方式二");
        DeepProtoType deepProtoType1 = deepProtoType.deepClone();
        System.out.println(deepProtoType1);

    }
}
